package com.xxx.springboot.config;

import io.redisearch.client.Client;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RediSearchConfig {

    @Value("${spring.redis.host}")
    private String host;

    @Value("${spring.redis.port}")
    private int port;

    @Bean
    public Client rediSearchClient() {
        // 创建 RediSearch 客户端
        return new Client("productIndex", host, port);
    }
}
